#include "module.hxx"
#include "modules.hxx"
#include "module_demo.hxx"
#include "module_demo_pending.hxx"

struct TestModuleSt List[] = {
    {
        .name = "demo",
        .defaultResult = TestResultAsPass,
        .moduleEnable  = ModuleEnable,
        .autoEnable    = ModuleAutoEnable,
        .preInit       = demo_preInit,
        .init          = demo_init,
        .run           = demo_run,
        .quit          = demo_quit,
        .getPendingData = nullptr,
        .action_notify = demo_notify,
        .arg           = &demo_arg, // nullptr
    },
    {
        .name = "pending",
        .defaultResult = TestResultAsPass,
        .moduleEnable  = ModuleEnable,
        .autoEnable    = ModuleAutoEnable,
        .preInit       = nullptr,
        .init          = nullptr,
        .run           = pending_run,
        .quit          = nullptr,
        .getPendingData = pending_getPendingData,
        .action_notify = pending_notify,
        .arg           = nullptr,
    },

    /*Must end with this */
    {
        "",
    },
};


struct TestModuleSt* getModuleList(void)
{
    return List;
}

#if 0
struct moduleMAList allModules[] = {
    {
        getDemoModule,
    },
    //////////////////////////
    {
        nullptr, nullptr
    }, /*Must end with this */
};

struct moduleMAList* getModuleMethodArray(void)
{
    return allModules;
}
#endif
